<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>蓝旭第三次作业2</title>
</head>

<body>
    <script>
        var str = 'I Love You';
        var arr = str.split("");
        var arr1 = arr.slice(7, 10);
        var arr2 = arr.slice(0, 1);
        var arr3 = arr.slice(1, 7);
        arr4 = arr1.concat(arr3, arr2);
        var str1 = arr4.join("");
        console.log(str1);
    </script>

</body>

</html>